package com.springcloud.log.feign;

import com.springcloud.commom.api.R;
import com.springcloud.log.entity.SysOpLog;
import com.springcloud.log.entity.SysVisLog;
import com.springcloud.log.modular.log.service.SysOpLogService;
import com.springcloud.log.modular.log.service.SysVisLogService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestController;

@RestController
@AllArgsConstructor
@Slf4j
public class LogClient implements ILogClient{

    private SysVisLogService sysVisLogService;

    private SysOpLogService sysOpLogService;

    @Override
    public R saveVisLog(SysVisLog sysVisLog) {
        sysVisLogService.save(sysVisLog);

        return R.success();
    }

    @Override
    public R<String> saveOpLog(SysOpLog sysOpLog) {
        sysOpLogService.save(sysOpLog);

        return R.success();
    }
}
